<template>
	<layout :navObj="topNavObj" :leftIcon="leftIcon" :navbackgroundColor="navbgc">
		<view slot="medi">
			<view class="top" :style="[{ background: navbgc }]">
				<headPortrait :describe="nameDes" :name="name" :imgUrl="photoSrc"></headPortrait>
			</view>
		</view>
	</layout>
</template>

<script>
import tabBat from '@/pages/components/tabBar.vue';
import headPortrait from '@/pages/components/tool/headPortrait.vue';
export default {
	components: {
		tabBat,
		headPortrait
	},
	data() {
		return {
			topNavObj: {
				title: '我的'
			},
			leftIcon: '',
			navbgc: 'linear-gradient(to right, #ffbf00,#756b4c)',
			nameDes: '我是一个非常帅的人', //描述
			name: '大超', //昵称
			photoSrc: '../../../static/uni.png', //头像地址
			avatarUrl: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
		};
	},
	methods: {
		onChooseAvatar(e) {
			const { avatarUrl } = e.detail;
			console.log(avatarUrl, 'avatarUrl');
			this.photoSrc = avatarUrl;
		}
	},
	mounted() {
		let a = 'w 我是你的 超 爸爸';
		const b = this.common.Base64(a, 'encode');
		const c = this.common.Base64(b, 'decode');

		console.log(b, '加密的');
		console.log(c, '解密的');
	}
};
</script>

<style lang="less" scoped>
.top {
	border-bottom-left-radius: 15px;
	border-bottom-right-radius: 15px;
}
</style>
